//
//  FXPStudy.h
//  FXPlearn
//
//  Created by ashuan on 16/8/2.
//  Copyright © 2016年 范玉辉. All rights reserved.
//

/***************************************************************
1.手机系统：iPhone OS
NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];
2.手机类型：iPhone 6
NSString* phoneModel = [Function iphoneType];//方法在下面
3.手机系统版本：9.1
NSString * iponeM = [[UIDevice currentDevice] systemName];
4.电池电量
CGFloat batteryLevel=[[UIDevicecurrentDevice]batteryLevel];
 ****************************************************************
 */
#import <Foundation/Foundation.h>

@interface FXPStudy : NSObject
// 获取手机外网网址
+(NSDictionary *)deviceWANIPAdress;
// 获取手机的外网地址
+ (NSString*)deviceVersion;
// 获取手机的运营商
+ (NSString *)getphonyNetworkInfo;
// json转换
+(id)getObjectFromJsonString:(NSString *)jsonString;


#pragma mark -  NSDate互转NSString
+(NSDate *)NSStringToDate:(NSString *)dateString;
+(NSDate *)NSStringToDate:(NSString *)dateString withFormat:(NSString *)formatestr;
+(NSString *)NSDateToString:(NSDate *)dateFromString withFormat:(NSString *)formatestr;

#pragma mark -  判断字符串是否为空,为空的话返回 “” （一般用于保存字典时）
+(NSString *)IsNotNull:(NSString*)string;
+(BOOL) isBlankString:(id)string;

#pragma mark -  手机号码验证
+(BOOL) isValidateMobile:(NSString *)mobile;
#pragma mark -  计算内容文本的高度方法
+ (CGFloat)HeightForText:(NSString *)text withSizeOfLabelFont:(CGFloat)font withWidthOfContent:(CGFloat)contentWidth;

#pragma mark -  计算字符串长度
+ (CGFloat)WidthForString:(NSString *)text withSizeOfFont:(CGFloat)font;

#pragma mark -  计算两个时间相差多少秒

+(NSInteger)getSecondsWithBeginDate:(NSString*)currentDateString  AndEndDate:(NSString*)tomDateString;

#pragma mark - 根据出生日期获取年龄
+ (NSInteger)ageWithDateOfBirth:(NSDate *)date;

#pragma mark - 根据经纬度计算两个位置之间的距离
+(double)distanceBetweenOrderBylat1:(double)lat1 lat2:(double)lat2 lng1:(double)lng1 lng2:(double)lng2;

#pragma mark - 生成二维码
+ (UIImage *)createNonInterpolatedUIImageFormcreateQRForString:(NSString *)qrString withSize:(CGFloat) size;
#pragma mark - 改变Label中指定字符的颜色大小
+(void)setTextColor:(UILabel *)label FontNumber:(id)font AndText:(NSString *)test AndColor:(UIColor *)vaColor;
#pragma mark - 汉字转拼音
+ (NSString *)ChineseToPinyin:(NSString *)text;



@end
